import request  from '@/utils/request';

import { BASE_URL } from '@/config/query';

export async function queryPage(params = { pageSize: 10, pageNum: 1 }) {
  return request(`${BASE_URL}/risk/page`, params);
}

export async function queryInfoById(id) {
  return request(`${BASE_URL}/risk/detail/web/${id}`)
}

export async function create(params) {
  return request(`${BASE_URL}/risk/create`, params);
}

export async function update(params) {
  return request(`${BASE_URL}/risk/modify`, params);
}
// 列表查询建筑
export async function queryLocationList() {
  return request(`${BASE_URL}/build/list`);
}

// 列表查楼层、区域
export async function queryOptionList(params) {
  let url = params.url;
  delete params.url;
  return request(`${BASE_URL}/${ url }`, params);
}


//隐患状态统计 四个状态

export async function riskStateCount(){
  return request(`${BASE_URL}/risk/list/state/count`);
}




